package com.whsr.readservice.util;

import java.util.HashMap;
import java.util.Map;

public class ResultUtil {

    public static Map<String, Object> getResultBySuccess(Object root){
        Map<String, Object> res = new HashMap<>();
        Map<String, Object> result = new HashMap<>();
        result.put("RESULT_CODE", 1000);
        result.put("RESULT_DESC", "查询成功");
        res.put("RESULT", result);
        res.put("ROOT", root);
        return res;
    }

    public static Map<String, Object> getResultByError(){
        Map<String, Object> res = new HashMap<>();
        Map<String, Object> result = new HashMap<>();
        result.put("RESULT_CODE", 0000);
        result.put("RESULT_DESC", "查询失败");
        res.put("RESULT", result);
        return res;
    }

}
